package com.didispace.web;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@RestController
public class HelloController {

    @RequestMapping("/hello")
    public String index(HttpServletRequest request) {
        System.out.println("request.getRequestURL() = " + request.getRequestURL());
        System.out.println("request.getRequestURI() = " + request.getRequestURI());
        System.out.println("index() execute ");
        return "Hello World";
    }
	/*
	request.getRequestURL() = http://localhost/hello
request.getRequestURI() = /hello
	 */

}